package com.saleoffline.server.domain.member;

import java.util.HashMap;
import java.util.Map;

import com.saleoffline.server.Search;

public class MemberSearch extends Search {
	private OrderByType orderByType;
	
	public static Map<OrderByType, OrderByItem> orderByMapping = new HashMap<OrderByType, OrderByItem>() {{
		put(OrderByType.ID, new OrderByItem("id", SortType.DESC));
		put(OrderByType.DATE, new OrderByItem("id", SortType.DESC));
	}};
	
	public MemberSearch() {
		addOrderByItem(orderByMapping.get(OrderByType.ID));
	}
	
	public static enum OrderByType {
		ID, DATE
	}

	public OrderByType getOrderByType() {
		return orderByType;
	}

	public void setOrderByType(OrderByType orderByType) {
		this.orderByType = orderByType;
		addOrderByItem(orderByMapping.get(orderByType));
	}
}